<%@page contentType="text/html"%>
<%@page pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<script>
	$(document).ready(function() {
		
	});

	$(function() {
		$( "input:submit" ).button();
		$( "#dob" ).datepicker({ dateFormat: 'dd/mm/yy' });
	});
</script>
          	             
<div id="content">			
    <div class="post">
        <h2>Pendaftaran Anggota</h2>                    
        <div class="entry">       
            <s:actionerror cssStyle="color:#FF0000"/>            
            <s:form action="addReg">
            	
            	<s:hidden name="member.id"/>            	            
            	<s:hidden name="oldCycledOut"/>
            	<s:hidden name="member.parentId"/>
            	<s:hidden name="member.currMember"/>
            	<s:hidden name="editMode"/>
            
            	<table cellspacing="10">
            		<tr>
						<td colspan="2">Info dengan tanda <s:text name="required"/> harus diisi</td>
					</tr>					
					<tr>
						<td>Nama:<s:text name="required"/></td>															
						<td><s:textfield name="member.name" size="40"/></td>
					</tr>
					<tr>
						<td>Alamat:<s:text name="required"/></td>															
						<td><s:textfield name="member.address" size="40"/></td>
					</tr>
					
					<tr>
						<td>Kota:<s:text name="required"/></td>															
						<td><s:textfield name="member.city" size="30"/></td>
					</tr>
					
					<tr>
						<td>Propinsi:<s:text name="required"/></td>															
						<td><s:textfield name="member.province" size="30"/></td>
					</tr>
					
					<tr>
						<td>Kode Pos:<s:text name="required"/></td>															
						<td><s:textfield name="member.postalCode" size="10"/></td>
					</tr>
					
					<tr>
						<td>Email:<s:text name="required"/></td>															
						<td><s:textfield name="member.email" size="30" readonly="%{editMode}"/></td>
					</tr>
					
					<tr>
						<td>Tipe Id:<s:text name="required"/></td>															
						<td>
							<s:select
								name="member.idType"
								headerKey="" headerValue="--Pilih--"
								list="listIdentity"
								listKey="code"
								listValue="desc"/>															
						</td>
					</tr>
					
					<tr>
						<td>No Id:<s:text name="required"/></td>															
						<td><s:textfield name="member.idNo" size="30"/></td>
					</tr>
					
					<tr>
						<td>Tanggal Kelahiran:</td>															
						<td><s:textfield name="member.dob" size="15" id="dob" format="dd/MM/yyyy"/></td>
					</tr>
					
					<tr>
						<td>Jenis Kelamin:</td>															
						<td>
							<s:select
								name="member.gender"
								headerKey="" headerValue="--Pilih--"
								list="listGender"
								listKey="code"
								listValue="desc"/>															
						</td>
					</tr>
					
					<tr>
						<td>Telp:<s:text name="required"/></td>															
						<td><s:textfield name="member.mobile" size="20"/></td>
					</tr>	
					
					<!-- 
					<tr>
						<td>Tipe Keanggotaan:<s:text name="required"/></td>															
						<td>
							<s:select
								name="member.membershipType"
								headerKey="" headerValue="--Pilih--"
								list="listMembership"
								listKey="code"
								listValue="desc"/>															
						</td>
					</tr>
					 -->
																			
					<tr>
						<td>Email Parent:</td>															
						<td><s:textfield size="20" name="leaderEmail" readonly="%{editMode && !member.cycledOut}"/></td>
					</tr>
					
					<s:if test="%{editMode}">
						<tr>
							<td>Cycled Out:</td>															
							<td><s:checkbox name="member.cycledOut"/></td>
						</tr>
					</s:if>																															
					
					<tr>
						<td colspan="2"><s:submit value="Simpan"/></td>
					</tr>
					
				</table>
            </s:form>
        </div>
    </div>                				             
</div><!-- content -->                       


